﻿

using IotClientService.Handles.lgs;
using IotClientService.Models.Lg.Remote;
using IotClientService.Models.Lg;
using IotContract.Dtos.Servers.Process;
using IotContract.Models.Clients.Hks;

using IotContract.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XT.Common.Models.Server;

namespace IotClientService.Services;
public interface ILgApiService
{
    string? RemoteApiUrl { get; set; }

    void LogData(string title, object data);
    void LogMessage(string content);
    #region 组盘机
    /// <summary>
    /// 当托盘进入后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitAssembleTrayEnter(LgTrayEnterRequest lgTrayEnterRequest);
    /// <summary>
    /// 提交组盘机挑选结果 ,结果为 托盘+4个电芯，每挑选4个触发一次
    /// </summary>
    /// <param name="cellResultRequest"></param>
    /// <returns></returns>

    Task<AdminCodeResult<LgNgResult>> CommitAssembleResult(LgCellResultRequest cellResultRequest);


    /// <summary>
    /// 组盘机作业开始、作业结束报告
    /// </summary>
    /// <param name="lgAssembleReportRequest"></param>
    /// <returns></returns>

    Task<AdminCodeResult<LgNgResult>> CommitAssembleReport(LgAssembleReportRequest lgAssembleReportRequest);

    /// <summary>
    /// 托盘出组盘上报
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitAssembleTrayOut(LgTrayOutRequest lgTrayOutRequest);
    #endregion

    #region 拆盘机
    /// <summary>
    /// 拆盘机托盘进设备上报
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitDisAssembleTrayEnter(LgTrayEnterRequest lgTrayEnterRequest);
    /// <summary>
    /// 拆盘机托盘出设备上报
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitDisAssembleTrayOut(LgTrayOutRequest lgTrayOutRequest);
    /// <summary>
    /// 拆盘机作业开始、作业结束报告
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitDisAssembleReport(LgTrayReportRequest lgTrayReportRequest);

    /// <summary>
    /// 获取托盘电芯位置
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgTrayPositionResult>> GetTrayPositionResult(LgTrayEnterRequest lgTrayEnterRequest);

    #endregion

    #region 清洗机
    /// <summary>
    /// 提交清洗机结果
    /// </summary>
    /// <param name="lgClearDataRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitClearResult(LgClearDataRequest lgClearDataRequest);
    /// <summary>
    /// 提交清洗机结果
    /// </summary>
    /// <param name="lgClearDataRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitClearEnter(LgCellEnterRequest lgCellEnterRequest);
    #endregion

    #region 充放电设备
    /// <summary>
    /// 提交充放电结果
    /// </summary>
    /// <param name="lgFmtResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFmtResult(LgFmtResultRequest lgFmtResultRequest);


    /// <summary>
    /// 进行移库前验证
    /// </summary>
    /// <param name="lgRequestBase"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFmtChangeBox(LgRequestBase lgRequestBase);


    /// <summary>
    /// 充放电库位作业开始、作业结束报告
    /// </summary>
    /// <param name="lgFmtReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFmtReport(LgFmtReportRequest lgFmtReportRequest);
    /// <summary>
    /// 设备状态和温度报告
    /// </summary>
    /// <param name="lgFmtEquipStatusRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFmtEquipStatus(LgFmtEquipStatusRequest lgFmtEquipStatusRequest);
    /// <summary>
    /// 充放电库位托盘投入状态  R:Requst(当仓库清空时发送） A:Arrive(当托盘进入时请求）
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgFmtLoadResult>> CommitFmtEnter(LgTrayReportRequest lgTrayReportRequest);


    /// <summary>
    /// 充放电库位托盘清空状态  R:Requst(当仓库清空时发送） E:End(已清空）
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFmtOut(LgTrayReportRequest lgTrayReportRequest);


    /// <summary>
    /// 获取充放电配方
    /// </summary>
    /// <param name="lgTray"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgRecipeResult>> GetFmtRecipe(LgTrayReportRequest lgTray);


    /// <summary>
    /// 获取作业的channel
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgFmtChannelResult>> GetFmtChannel(LgTrayReportRequest lgTrayReportRequest);

    #endregion
    #region 预充
    /// <summary>
    /// 预充机托盘投入状态  A:Arrive(当托盘进入时请求）
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgPreChargeLoadResult>> CommitPreChargeEnterOut(LgTrayReportRequest lgTrayReportRequest);
    #endregion

    #region 后氦检机
    /// <summary>
    /// 后氦检进站
    /// </summary>
    /// <param name="lgCellEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitHeiEnter(LgCellEnterRequest lgCellEnterRequest);
    
    /// <summary>
    /// 提交后氦检机数据结果
    /// </summary>
    /// <param name="lgHeiResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitHeiResult(LgHeiResultRequest lgHeiResultRequest);

    #endregion

    #region 外观检测机器
    /// <summary>
    /// 提交外观检测结果
    /// </summary>
    /// <param name="lgInspectResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<List<LgNgCellResult>>> CommitInspectResult(LgInspectResultRequest lgInspectResultRequest);

    #endregion

    #region 包膜机
    /// <summary>
    /// 提交包膜机结果
    /// </summary>
    /// <param name="lgLaminateResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitLaminateResult(LgLaminateResultRequest lgLaminateResultRequest);


    /// <summary>
    /// 包膜机电芯投入请求判定条件
    /// </summary>
    /// <param name="lgCellEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgLaminateCellResult>> CommitLaminateEnter(LgCellEnterRequest lgCellEnterRequest);

    #endregion


    #region 二次注液机
    /// <summary>
    /// 提交二次注液结果数据
    /// </summary>
    /// <param name="lgLiquidResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitLiquidResult(LgLiquidResultRequest lgLiquidResultRequest);

    /// <summary>
    /// 二次注液机电芯投入请求判定条件
    /// </summary>
    /// <param name="lgCellEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgLiquidCellResult>> CommitLiquidEnter(LgCellEnterRequest lgCellEnterRequest);

    #endregion


    #region 充氦打钉机
    /// <summary>
    /// 充氦打钉机提交结果
    /// </summary>
    /// <param name="lgNailingResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitNailingResult(LgNailingResultRequest lgNailingResultRequest);


    /// <summary>
    /// 充氦打钉机电芯投入请求判定条件
    /// </summary>
    /// <param name="lgCellEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNailingCellResult>> CommitNailingEnter(LgCellEnterRequest lgCellEnterRequest);

    #endregion

    #region OCV
    /// <summary>
    /// 提交OCV结果
    /// </summary>
    /// <param name="lgOcvResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitOcvResult(LgOcvResultRequest lgOcvResultRequest);


    /// <summary>
    /// Ocv作业开始、作业结束报告
    /// </summary>
    /// <param name="lgFmtReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgOcvReportResult>> CommitOcvReport(LgOcvReportRequest lgFmtReportRequest);


    /// <summary>
    /// 当托盘进入后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgOcvTrayEnterResult>> CommitOcvTrayEnter(LgTrayEnterRequest lgTrayEnterRequest);



    /// <summary>
    /// 获取OCV作业配方
    /// </summary>
    /// <param name="lgOcvReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgOcvRecipe>> GetOcvRecipe(LgOcvReportRequest lgOcvReportRequest);

    #endregion

    #region 密封钉焊机
    /// <summary>
    /// 密封钉焊机提交结果
    /// </summary>
    /// <param name="lgSealNailResultRequest"></param>
    /// <returns></returns>>
    Task<AdminCodeResult<List<LgCellNg>>> CommitSealNailResult(LgSealNailResultRequest lgSealNailResultRequest);


    /// <summary>
    /// 电芯投入
    /// </summary>
    /// <param name="lgSealNailEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgSealNailCellResult>> CommitSealNailEnter(LgSealNailEnterCellRequest lgSealNailEnterRequest);

    #endregion


    #region 筛选机
    /// <summary>
    /// 每次挑选提交结果，可以不作处理，非必须
    /// </summary>
    /// <param name="lgSelResultRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitSelResult(LgSelResultRequest lgSelResultRequest);

    /// <summary>
    /// 作业开始、结束
    /// </summary>
    /// <param name="lgSelReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitSelReport(LgSelReportRequest lgSelReportRequest);

    /// <summary>
    /// 托盘投入
    /// </summary>
    /// <param name="lgSelReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitSelEnter(LgSelReportRequest lgSelReportRequest);

    /// <summary>
    /// 托盘投出
    /// </summary>
    /// <param name="lgSelReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitSelOut(LgSelReportRequest lgSelReportRequest);

    /// <summary>
    /// 获取筛选配方
    /// </summary>
    /// <param name="lgTrayReportRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgSelRecipe>> GetSelRecipe(LgTrayReportRequest lgTrayReportRequest);

    #endregion

    #region 公用
    /// <summary>
    /// 当托盘进入后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitTrayEnter(LgTrayEnterRequest lgTrayEnterRequest);

    /// <summary>
    /// 当托盘出去后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitTrayOut(LgTrayOutRequest lgTrayEnterRequest);



    /// <summary>
    /// 当电芯进入后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitCellEnter(LgCellEnterRequest lgCellEnterRequest);

    /// <summary>
    /// 当电芯进入后，触发接口进行验证
    /// </summary>
    /// <param name="lgTrayEnterRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitCellOut(LgCellOutRequest lgCellOutRequest);


    /// <summary>
    /// 火灾报警、复位
    /// </summary>
    /// <param name="lgFireRequest"></param>
    /// <returns></returns>
    Task<AdminCodeResult<LgNgResult>> CommitFire(LgFireRequest lgFireRequest);


    

    #endregion


  

    
}
